package a.d.a;

import a.c.v;
import a.c.y;
import a.c.z;
import a.d.b.n;

import java.util.Collection;
import java.util.Comparator;
import java.util.Iterator;

public class a
{
  public static boolean a;
  
  static z a(n paramn, Collection paramCollection)
  {
    boolean bool = c.m;
    int i = c.l;
    z localz1 = new z(paramCollection);
    z localz2 = new z();
    localz1.a(new a_(paramn.a()));
    if (!bool) {
      if (localz1.isEmpty()) {
        return localz2;
      }
    }
    Object localObject1 = localz1.b();
    localz2.b(localObject1);
    do
    {
      do
      {
        if (localz1.isEmpty()) {
          break;
        }
        if (i != 0) {
          break label114;
        }
        if (!localObject1.equals(localz1.a())) {
          break;
        }
        localz1.b();
      } while (i == 0);
    } while (bool);
    if (localz1.isEmpty()) {
      label114:
      return localz2;
    }
    localObject1 = localz1.b();
    v localv1 = localz2.b(localObject1);
    y localy = localz1.h();
    if (localy.e()) {}
    label236:
    while (bool)
    {
      Object localObject2 = localy.j();
      v localv2;
      do
      {
        do
        {
          v localv3;
          while (bool)
          {
            if (!bool)
            {
              if (localObject2.equals(localObject1)) {
                break label400;
              }
              localObject1 = localObject2;
            }
            if ((bool) || (localz2.size() == 2)) {
              if (!bool)
              {
                if (paramn.e(localz2.a(), localz2.d(), localObject2))
                {
                  if (bool) {
                    break label236;
                  }
                  localv1.a(localObject2);
                }
              }
              else {
                if (i == 0) {
                  break label400;
                }
              }
            }
            localv2 = localv1;
            if (!paramn.d(localz2.f(localv2).c(), localv2.c(), localObject2)) {}
            while (bool)
            {
              localv2 = localz2.f(localv2);
              if (bool) {
                break label409;
              }
              if (i != 0) {
                break label407;
              }
              if (i == 0) {
                break;
              }
            }
            localv3 = localv1;
            do
            {
              if (paramn.b(localz2.e(localv3).c(), localv3.c(), localObject2)) {
                break;
              }
              if (bool) {
                break label398;
              }
              localv3 = localz2.e(localv3);
              if (i != 0) {
                break label385;
              }
            } while (i == 0);
          }
          if (localv3 == localz2.e(localv2)) {
            break;
          }
          localz2.h(localz2.e(localv2));
          if (bool) {
            break label409;
          }
          if (i != 0) {
            break label407;
          }
        } while (i == 0);
      } while (bool);
      localv1 = localz2.b(localObject2, localv2);
      localy.f();
      if (i == 0) {
        break;
      }
    }
    label385:
    label398:
    label400:
    label407:
    label409:
    return localz2;
  }
  
  public static boolean a(n paramn, Collection paramCollection1, Collection paramCollection2)
  {
    boolean bool = c.m;
    int j = c.l;
    if (!bool) {
      if (paramCollection2.size() < 3) {
        return true;
      }
    }
    int i = 0;
    Object[] arrayOfObject = paramCollection2.toArray();
    Object localObject1 = arrayOfObject[(arrayOfObject.length - 1)];
    do
    {
      Object localObject2;
      do
      {
        do
        {
          if (i >= paramCollection2.size()) {
            break label129;
          }
          localObject2 = arrayOfObject[i];
          Iterator localIterator = paramCollection1.iterator();
          Object localObject3;
          do
          {
            if (!localIterator.hasNext()) {
              break;
            }
            localObject3 = localIterator.next();
          } while (!paramn.b(localObject1, localObject2, localObject3));
        } while (bool);
      } while (j != 0);
      return false;
      localObject1 = localObject2;
      i++;
    } while (j == 0);
    label129:
    return true;
  }
  
  static class a_
    implements Comparator, l.j_
  {
    Comparator a;
    
    public a_(Comparator paramComparator)
    {
      this.a = paramComparator;
    }
    
    public int compare(Object paramObject1, Object paramObject2)
    {
      return this.a.compare(paramObject2, paramObject1);
    }
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.d.a.a

 * JD-Core Version:    0.7.0.1

 */